/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.inspur.edp.cef.generator.overall.commonModel;

import com.inspur.edp.caf.generator.module.ModuleGenerator;
import com.inspur.edp.cef.generator.overall.CefGenerator;
import com.inspur.edp.cef.generator.overall.CefGeneratorContext;
import com.inspur.edp.cef.generator.repository.RepositoryGenerator;
import com.inspur.edp.jittojava.context.JitContext;
import com.inspur.edp.lcm.metadata.api.entity.GspMetadata;

public abstract class CommonModelGenerator extends CefGenerator {
  protected CommonModelGenerator(
      String path,
      GspMetadata metadata,
      boolean preGenerating,
      ModuleGenerator refGenerator,
      JitContext jitContext) {
    super(path, metadata, preGenerating, refGenerator, jitContext);
  }

  protected CommonModelGenerator(
      String path,
      GspMetadata metadata,
      CommonModelGeneratorContext refGenCtx,
      ModuleGenerator refGenerator,
      JitContext jitContext) {
    super(path, metadata, refGenCtx, refGenerator, jitContext);
  }

  @Override
  protected CefGeneratorContext createCefGeneratorContext() {
    CommonModelGeneratorContext ctx = createCMGenContext();
    return ctx;
  }

  @Override
  public CommonModelGeneratorContext getContext() {
    return (CommonModelGeneratorContext) super.getContext();
  }

  protected abstract CommonModelGeneratorContext createCMGenContext();

//  @Override
//  protected final CefApiGenerator createApiGenerator() {
//    return createCMApiGenerator();
//  }

//  @Override
//  protected final RepositoryGenerator getRepositoryGenerator() {
//    return getCMRepositoryGenerator();
//  }

  protected abstract RepositoryGenerator getCMRepositoryGenerator();

//  @Override
//  protected final BaseEntityGenerator createEntityGenerator() {
//    return createCMEntityGenerator();
//  }

//  @Override
//  protected final CefCoreGenerator createCoreGenerator() {
//    return createCMCoreGenerator();
//  }
//
//  protected abstract CommonModelCoreGenerator createCMCoreGenerator();
//
//  protected abstract CommonModelEntityGenerator createCMEntityGenerator();
//
//  protected abstract CommonModelApiGenerator createCMApiGenerator();
}
